#include <string>
#include "rclcpp/rclcpp.hpp"
#include "demo_cpp_pkg/person_node.hpp"

class WriterNode : public PersonNode
{
private:
    std::string book_;

public:
    WriterNode(std::string node_name, std::string name, int age, std::string book) : PersonNode(node_name, name, age)
    {
        book_ = book;
    }
};

int main(int argc, char **argv)
{
    rclcpp::init(argc, argv);
    auto node = std::make_shared<WriterNode>("writer_node","法外狂徒张三",18, "论快速入狱");
    node->eat("鱼香肉丝");
    rclcpp::spin(node);
    rclcpp::shutdown();
    return 0;
}